package com.dongwu.manager.entity;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.dongwu.common.entity.BaseEntity;
import com.dongwu.security.entity.User;

/**
 * 远程控制
 * @author xyj
 * @date 2017年10月16日
 */
@Entity
public class RemoteMonitoring extends BaseEntity<String>{

	@ManyToOne(cascade={CascadeType.MERGE,CascadeType.REFRESH})
    @JoinColumn(name="deviceId")
	private Device device;
	
	private String msg;
	
	@ManyToOne(cascade={CascadeType.MERGE,CascadeType.REFRESH})
    @JoinColumn(name="userId")
	private User user;
	
	public enum type{
		success,
		fail
	}
	private type State;
	
	public Device getDevice() {
		return device;
	}
	public void setDevice(Device device) {
		this.device = device;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public type getState() {
		return State;
	}
	public void setState(type state) {
		State = state;
	} 
	
	
}
